/**
 * 班级模块路由文件
 */

const Router = require('koa-router');
const router = new Router();
const { validAdd, validUpdate, validGet } = require('../validators/class_list');
const { validate } = require('../validators/common');
const { add, update, getList } = require('../services/class_list');

router.prefix('/classlist');

router.post('/add', validate(validAdd), add);

router.put('/update', validate(validUpdate), update);

router.get('/list', validate(validGet), getList);

module.exports = router;